<?php
/*
*  时间数组
*/
class dateArr{
	private $dBegin;
	private $dEnd;
	public $temp;
	public function getDateArr($d,$e){
		$this->dBegin = $d;
		$this->dEnd = $e;
		$res = $this->makeArr($this->difference($d,$e));
		return $res;
	}
	private function makeArr($a){
		$start = strtotime($this->dBegin);
		for($i=0;$i<=$a;$i++){
			$date = $start;
			$start += 60 * 60 * 24;
			$dateH = date("Y-m-d",$date);
			$arr[$dateH] = array("pay"=>0,"lose"=>0,"settlement"=>0,"found"=>0,"total"=>0,"ttecincome"=>0,"stamp"=>$date);		
		}
		return $arr;
	}
	private function difference($d,$e){
		$temp=strtotime($e)-strtotime($d);
		return $this->temp = $temp / (60 * 60 * 24);
	}
}
?>